package site.dao;

/**
 * @type SQLString
 * @info author:陈亚鹏 date:2012-9-19 下午03:10:22 version:1.0
 */
public final class SQLString {
	public final static String SQL_ARTICLE_INSERT = "INSERT INTO article(uuid, title, content, imagePath, filePath, authorId, cid, categoryId, publishDate, updateDate, status, entityStatus) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)";
	public final static String SQL_ARTICLE_UPDATE = "UPDATE article SET uuid=?, title=?, content=?, imagePath=?, filePath=?, authorId=?, cid=?, categoryId=?, updateDate=?, status=?, entityStatus=? WHERE id=?";

	public final static String SQL_CATEGORY_INSERT = "INSERT INTO category(uuid, cid, name, parentCid, level, type, entityStatus, entityDatetime) VALUES(?, ?, ?, ?, ?, ?, ?, ?)";

	public final static String SQL_ROLE_INSERT = "INSERT INTO role(uuid, name, entityStatus, entityDatetime) VALUES(?, ?, ?, ?)";

	public final static String SQL_USER_INSERT = "INSERT INTO user(uuid, name, email, password, rid, address, telephone, fax, contactPerson, description, entityStatus, entityDatetime, status, realName, isReal) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";

	public final static String SQL_RESOURCE_UPDATE = "UPDATE resource SET type=?, normcode=?, title=?, format=?, course=?,chapter=?, chapters=?, author=?, authorRealName=?, partners=?,teamCode=?, provider=?, keywords=?, note=?, fileName=?,publicTime=?, createTime=?, relate=?, updateType=?, authorId=?,visitNum=?, status=?, entityDatetime=?, entityStatus=?,cid=? WHERE uuid = ?";
	public final static String SQL_RESOURCE_INSERT = "INSERT INTO resource(uuid, type, normcode, title, format, course,chapter, chapters, author, authorRealName, partners,teamCode, provider, keywords, note, fileName,publicTime, createTime, relate, updateType, authorId,visitNum, status, entityDatetime, entityStatus,cid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?,?, ?, ?, ?, ?,?, ?, ?,?, ?, ?)";
	public final static String SQL_RESOURCE_DELETE = "UPDATE resource SET entityStatus='0' WHERE `uuid`=?";

	public final static String SQL_REVIEW_INSERT = "INSERT INTO review (advice, resourceid, reviewerid, reviewername, status) VALUES (?,?,?,?,?)";
	public static final String SQL_REVIEW_DELETE = "UPDATE review SET ind='0' WHERE id=?";
	
	public static final String SQL_PAPER_INSERT = "INSERT INTO paper(`uuid`,`title`,`description`,`filePath`,`authorName`,`source`,`type`,`cid`,`publishDate`) VALUES (?,?,?,?,?,?,?,?,?);";
	public static final String SQL_PAPER_UPDATE = "UPDATE paper SET uuid=?, title=?, description=?, filePath=?, authorName=?,source=?, type=?, cid=?, publishDate=? WHERE id=?";
	public static final String SQL_PAPER_DELETE = "UPDATE paper SET entityStatus='0' WHERE `id`=?";
}
